import request from '@/utils/request'

// 查询商家商品列表
export function listCompanyGoods(query) {
  return request({
    url: '/system/companyGoods/list',
    method: 'get',
    params: query
  })
}

// 查询商家商品列表_附加库存
export function listCompanyGoods_stock(query) {
  return request({
    url: '/system/companyGoods/list_stock',
    method: 'get',
    params: query
  })
}

// 查询商家商品详细
export function getCompanyGoods(id) {
  return request({
    url: '/system/companyGoods/' + id,
    method: 'get'
  })
}

// 新增商家商品
export function addCompanyGoods(data) {
  return request({
    url: '/system/companyGoods',
    method: 'post',
    data: data
  })
}

// 修改商家商品
export function updateCompanyGoods(data) {
  return request({
    url: '/system/companyGoods',
    method: 'put',
    data: data
  })
}

// 删除商家商品
export function delCompanyGoods(id) {
  return request({
    url: '/system/companyGoods/' + id,
    method: 'delete'
  })
}
